<#include "./_header.htm">
<#import "mymacros.ftl" as mymacro>
<!-- Main Header -->
<header class="main-header">

	<!-- Logo -->
	<a href="${ctx}/" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels -->
		<span class="logo-mini">营销</span> <!-- logo for regular state and mobile devices -->
		<span class="logo-lg">${companyShortName}微信营销</span>
	</a>

	<!-- Header Navbar -->
	<nav class="navbar navbar-static-top" role="navigation">
		<!-- Sidebar toggle button-->
		<a href="#" class="sidebar-toggle" data-toggle="push-menu" onclick="setLeftMenuStyle('');"
			role="button"> <span class="sr-only">Toggle navigation</span>
		</a>
		<!-- Navbar Right Menu -->
		<div class="navbar-custom-menu">
			<ul class="nav navbar-nav">

				<!-- Notifications Menu -->
				<!-- Tasks Menu -->
				<!-- User Account Menu -->
				<li class="dropdown user user-menu">
					<a href="#" class="dropdown-toggle"> 
						<span class="hidden-xs">欢迎：${loginUser.nickName!}&nbsp;登录!</span>
					</a>
				</li>
				<!-- <li class="dropdown user user-menu">
					<a href="javascript:void(0)" class="dropdown-toggle" onclick="resetForm.form()">
						<i class="fa fa-wrench"></i>修改密码
					</a>
				</li> -->
				<li class="dropdown user user-menu">
					<a href="${ctx}/logout" class="dropdown-toggle" class="btn btn-default btn-flat">
						<i class="fa fa-power-off"></i>退出
					</a>
				</li>
			</ul>
		</div>
		<script type="text/javascript">
			function setLeftMenuStyle(str) {
				/* 包含sidebar-collapse样式时，是合并的 。 没有时是展开的。 */
				/* console.log(str); */
				var operation;
				if ( $("body").hasClass("sidebar-collapse") ) {
					operation = "";
				} else {
					operation = "addClass";
				}
				$.ajax({
					url : "${ctx}/setSessionSidebarCollapse",
					type : 'post',
					dataType : 'json',
					data : {"operation":operation},
					success : function(data) {
					}
				});
			}
		</script>
	</nav>
</header> <!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
	<!-- sidebar: style can be found in sidebar.less -->
	<section class="sidebar">

		<!-- Sidebar user panel (optional) -->
		<div class="user-panel">
			<div class="pull-left image">
				<img src="${ctx}/dist/img/avatar5.png" class="img-circle"
					alt="User Image">
			</div>
			<div class="pull-left info">
				<p>${loginUser.loginName!}</p>
				<!-- Status -->
				<#-- <a href="#"><i class="fa fa-user-circle-o"></i> ${loginUser.roleName!}</a> -->
			</div>
		</div>
		<!-- /.search form -->
		<#include "./leftbar.htm" >
	</section>
	<!-- /.sidebar -->
</aside>
